/*
 * > /*
>  * INSANE - Interactive Structural Analysis Environment
>  *
>  * Copyright (C) 2003-2004
>  * Universidade Federal de Minas Gerais
>  * Escola de Engenharia
>  * Departamento de Engenharia de Estruturas
>  *
>  * Author's email :     insane@dees.ufmg.br
>  * Author's Website :   http://www.dees.ufmg.br/insane
>  *
>  * This program is free software; you can redistribute it and/or
>  * modify it under the terms of the GNU General Public License
>  * as published by the Free Software Foundation; either version 2
>  * of the License, or any later version.
>  *
>  * This program is distributed in the hope that it will be useful,
>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  * GNU General Public License for more details.
>  *
>  * You should have received a copy of the GNU General Public License
>  * along with this program; if not, write to the Free Software
>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-
> 1307, USA.
 *
 */

package br.ufmg.dees.insane.xyplot.xyplot_model;

import java.io.Serializable;
import java.text.Format;

import br.ufmg.dees.insane.util.IPoint3d;

/**
 * @author  Samuel Silva Penna  TODO To change the template for this generated type comment go to  Window - Preferences - Java - Code Style - Code Templates
 */
public class Axis implements Serializable{
	
/**
     * Comment for <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 1L;

    
    //teste
    
    
/** The label of this Axis. */
protected String label;

/** The origin of this Axis. */
protected IPoint3d origin;

/** The scaleType of this Axis. */
protected String scaleType;

/** The mainMark of this Axis. */
protected double mainMark;

/** The secondaryMark of this Axis. */
protected double secondaryMark;

/** The size of this Axis. */
protected double size;

/** The numberFormat of this Axis. */
protected Format numberFormat;

/** The direction of this Axis. */
protected double[] direction;

protected IPoint3d p1;

protected IPoint3d p2;


//******************************************************************************

  /** Constructs a Axis, sets its label to aLabel and its origin to pi and end to pf.*/
 public Axis(String aLabel, IPoint3d pi, IPoint3d pf){
 
 label = aLabel; 
 origin = pi;
 p1 = pi;
 p2 = pf;
 direction = new double[3];

 }

 public Axis(){}
 
//******************************************************************************

 /**
 * Returns the inicial point of this Axis.
 * @return  p1 The inicial of this Axis.
 * @uml.property  name="p1"
 */
 public IPoint3d getP1(){
 	return p1;
 }
 
 /**
 * Sets the inicial point of this Axis.
 * @param newP  The inicial point of this Axis.
 * @uml.property  name="p1"
 */
 public void setP1(IPoint3d newP){
    p1 = newP;
  }
 
// ******************************************************************************
 /**
 * Returns the final point of this Axis.
 * @return  p2 The final of this Axis.
 * @uml.property  name="p2"
 */
 public IPoint3d getP2(){
 	return p2;
 }
 
 /**
 * Sets the final point of this Axis.
 * @param newP  The final point of this Axis.
 * @uml.property  name="p2"
 */
 public void setP2(IPoint3d newP){
 	p2 = newP;
 }

//******************************************************************************

 /**
 * Returns the label of this Axis.
 * @return  The label of this Axis.
 * @uml.property  name="label"
 */
 public String getLabel(){
 	return label;
 }

 /**
 * Sets the label of this Axis.
 * @param newLabel  The Label of this Axis.
 * @uml.property  name="label"
 */
 public void setLabel(String newLabel){
 	label = newLabel;
 }

//******************************************************************************
 
 /**
 * Returns the origin of this Axis.
 * @return  The origin of this Axis.
 * @uml.property  name="origin"
 */
 public IPoint3d getOrigin(){
 	return origin;
 }

 /**
 * Sets the origin of this Axis.
 * @param newOrigin  The origin of this Axis.
 * @uml.property  name="origin"
 */
 public void setOrigin(IPoint3d newOrigin){
 	origin = newOrigin;
 }

//******************************************************************************
 
 /**
 * Returns the scaleType of this Axis.
 * @return  The origin of this Axis.
 * @uml.property  name="scaleType"
 */
 public String getScaleType(){
 	return scaleType;
 }

 /**
 * Sets the scaleType of this Axis.
 * @param newScale  The scaleType of this Axis.
 * @uml.property  name="scaleType"
 */
 public void setScaleType(String newScale){
 	scaleType = newScale;
 }

//******************************************************************************

 /**
 * Returns the mainMark of this Axis.
 * @return  The mainMark of this Axis.
 * @uml.property  name="mainMark"
 */
 public double getMainMark(){
 	return mainMark;
 }
 
 /**
 * Sets the mainMark of this Axis.
 * @param newMainMark  The mainMark of this Axis.
 * @uml.property  name="mainMark"
 */
 public void setMainMark(double newMainMark){
 	mainMark = newMainMark;
 }

//******************************************************************************
 
 /**
 * Returns the secondaryMark of this Axis.
 * @return  The secondaryMark of this Axis.
 * @uml.property  name="secondaryMark"
 */
 public double getSecondaryMark(){
 	return secondaryMark;
 }

 /**
 * Sets the secondaryMark of this Axis.
 * @param newSecondaryMark  The secondaryMark of this Axis.
 * @uml.property  name="secondaryMark"
 */
 public void setSecondaryMark(double newSecondaryMark){
 	secondaryMark = newSecondaryMark;
 }

//******************************************************************************
 
 /**
 * Returns the size of this Axis.
 * @return  The size of this Axis.
 * @uml.property  name="size"
 */
 public double getSize(){
 	return size;
 }

 /**
 * Sets the size of this Axis.
 * @param newSize  The size of this Axis.
 * @uml.property  name="size"
 */
 public void setSize(double newSize){
 	size = newSize;
 }

//******************************************************************************
 
 /**
 * Returns the numberFormat of this Axis.
 * @return  The numberFormat of this Axis.
 * @uml.property  name="numberFormat"
 */
 public Format getNumberFormat(){
 	return numberFormat;
 }

 /**
 * Sets the numberFormat of this Axis.
 * @param newFormat  The numberFormat of this Axis.
 * @uml.property  name="numberFormat"
 */
 public void setNumberFormat(Format newFormat){
 	numberFormat = newFormat;
 }

//******************************************************************************

 /**
 * Returns the diretion of this Axis.
 * @return  The diretion of this Axis.
 * @uml.property  name="direction"
 */
 public double[] getDirection(){
 	return direction;
 }

 /** 
  *  Returns the diretion at the specified position.
  *  @param i The position of this direction.
  *  @return The direction at the specified position.  
  */
 public double getDirection(int i){
 	return direction[i];
 }
 
 /**
 * Sets the diretion of this Axis.
 * @param newDiretion  The diretion of this Axis.
 * @uml.property  name="direction"
 */
 public void setDirection(double[] newDirection){
 	direction = newDirection;
 }

 public void setDirection(int i, double newDirection){
 	direction[i] = newDirection;
 }

//******************************************************************************

}